package com.basic.pojo;

import com.basic.util.JSON;
import org.apache.kafka.common.serialization.Deserializer;

/**
 * @author xl-9527
 * @since 2024/12/16
 **/
public class UserInfo implements Deserializer<UserInfo> {

    private String name;
    private Integer age;
    private Integer deptId;
    private String deptName;

    public String getName() {
        return name;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(final Integer age) {
        this.age = age;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(final Integer deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(final String deptName) {
        this.deptName = deptName;
    }

    @Override
    public UserInfo deserialize(final String s, final byte[] bytes) {
        return JSON.parseObject(bytes, UserInfo.class);
    }
}
